// ignore_for_file: non_constant_identifier_names

import 'package:flutter/material.dart';

/// 主题色- 按钮渐变

LinearGradient mainLinearGradient = const LinearGradient(
    colors: [Color(0xFF22F2EB), Color(0xFF0FE1D3)], begin: Alignment.centerLeft, end: Alignment.centerRight);

LinearGradient buildLinearGradientHorizontal(Color startColor, Color endColor) {
  return LinearGradient(begin: Alignment.centerLeft, end: Alignment.centerRight, colors: [startColor, endColor]);
}

LinearGradient buildLinearGradienVertical(Color startColor, Color endColor) {
  return LinearGradient(begin: Alignment.topCenter, end: Alignment.bottomCenter, colors: [startColor, endColor]);
}

/// 白色变黑色
Widget buildChangeColorWidget({required double alpha, required Widget widget}) {
  return ColorFiltered(
      colorFilter: ColorFilter.matrix([
        1 - alpha,
        0,
        0,
        0,
        0,
        0,
        1 - alpha,
        0,
        0,
        0,
        0,
        0,
        1 - alpha,
        0,
        0,
        0,
        0,
        0,
        1,
        0,
      ]),
      child: widget);
}
